﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace IT_Pro.Class
{
    class CV_KichHoatTongDai
    {
        private string _nguoiYC;

        public string NguoiYC
        {
            get { return _nguoiYC; }
            set { _nguoiYC = value; }
        }

        private string _nguoiTH;

        public string NguoiTH
        {
            get { return _nguoiTH; }
            set { _nguoiTH = value; }
        }
        private string _loaiYC;

        public string LoaiYC
        {
            get { return _loaiYC; }
            set { _loaiYC = value; }
        }


        public int KichHoatTongDai()
        {
            string procName = "ThemYCKichHoatTongDai";
            SqlParameter[] parameters = new SqlParameter[4];
            parameters[0] = new SqlParameter("@ngayth", DateTime.Now);
            parameters[1] = new SqlParameter("@nguoiyc", NguoiYC);
            parameters[2] = new SqlParameter("@nguoith", NguoiTH);
            parameters[3] = new SqlParameter("@loaiyc", LoaiYC);
            int i = DataServices.ExcuteProcedureWithReturn(procName, parameters);
            return i;
        }
    }
}
